package com.qf.usefull.datedemo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo03 {
    public static void main(String[] args) throws ParseException {

        String s ="2000-01-01 12:12:12";

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        Date date = simpleDateFormat.parse(s);

        System.out.println(date);
        System.out.println(simpleDateFormat.format(date));

    }
}
